import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.system.domain.RongQiInfo;

import java.util.List;
import java.util.Map;

public class Lishi {
    public static void main(String[] args) {
        String s="{\n" +
                "    \"code\": 200,\n" +
                "    \"msg\": [\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_1_T1001\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data1_1730702271381\",\n" +
                "            \"index\": 1,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_2_T1002\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data2_1730702271889\",\n" +
                "            \"index\": 2,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_3_T1003\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data3_1730702272247\",\n" +
                "            \"index\": 3,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_4_T1004\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data4_1730702273077\",\n" +
                "            \"index\": 4,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_5_T1005\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data5_1732464001068\",\n" +
                "            \"index\": 5,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_7_T1007\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data7_1732464002213\",\n" +
                "            \"index\": 7,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_8_T1008\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data8_1732464002966\",\n" +
                "            \"index\": 8,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_6_T1006\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data6_1732477637584\",\n" +
                "            \"index\": 6,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_9_T1009\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data9_1732477639070\",\n" +
                "            \"index\": 9,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_10_T1010\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data10_1732689895698\",\n" +
                "            \"index\": 10,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"Names\": \"4cf202c60f230da66e13df14c1a58e77_11_T1011\",\n" +
                "            \"State\": \"running\",\n" +
                "            \"data\": \"/mmc/data/data11_1732690245306\",\n" +
                "            \"index\": 11,\n" +
                "            \"ip\": \"192.168.9.5\"\n" +
                "        }\n" +
                "    ]\n" +
                "}";

        JSONObject map=JSON.parseObject(s);
        List<RongQiInfo> list= JSONArray.parseArray(map.getString("msg"),RongQiInfo.class);
        System.out.println(list.get(0).getNames());
    }
}
